package liangtWorkSpace.controller;

import liangtWorkSpace.service.UserService;
import lombok.extern.log4j.Log4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * @ClassName TestController
 * @Description : 功能说明
 * @Author : LiangT
 * @Date : 2020/4/24 18:12
 */

@RestController
@Log4j
public class TestController
{
    @Autowired
    UserService userService;

    @RequestMapping("/aop")
    public UserService test(@RequestBody UserService userService){
        log.info("Test Aop");
        userService.setName("AOP");
        return userService;
    }
}
